Method and system for ip session keepalive monitoring, home gateway and network device

ABSTRACT

A method and a system for Internet Protocol (IP) session keepalive monitoring, a home gateway and a network device are provided. The method includes: receiving, by a User Equipment (UE) or an IP edge node, a Bidirectional Forwarding Detection (BFD) message sent by a Home Gateway (HGW), in which a first discriminator field value included in the BFD message is a difference between an IP address prefix of the UE and an IP address prefix of the HGW; and monitoring, by the UE or the IP edge node, whether an IP session between the IP edge node and the UE is keepalive according to the first discriminator field value in the BFD message. “Multihop BFD” is used as a keepalive monitoring mechanism of a “Multihop IPv6 Session”, thereby realizing keepalive monitoring of the “Multiple hop IPv6 Session”.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2010/070161, filed on Jan. 13, 2010, which claims priority toChinese Patent Application No. 200910001997.1, filed on Jan. 21, 2009,both of which are hereby incorporated by reference in their entireties.

FIELD OF THE INVENTION

The present invention relates to the field of communicationstechnologies, and in particular, to a method and a system for InternetProtocol (IP) session keepalive monitoring, a Home Gateway (HGW) and anetwork device.

BACKGROUND OF THE INVENTION

In an access network, an IP session represents a network accessconnection session associated with an IP address of a user, the “IPSession” and a Point-to-Point Protocol (PPP) session are peer-to-peer,and the “IP Session” and the “PPP Session” are collectively referred toas subscriber session. The PPP session adopts a particular PPP keepalivedetecting mechanism, and an IPv4 session adopts a particularBidirectional Forwarding Detection (BFD) or Address Resolution Protocol(ARP) keepalive detecting mechanism.

The “IP Session” is generally terminated on an IP edge node, such as aBroadband Network Gateway (BNG) or a Broadband Remote Access Server(BRAS), and the other side of the “IP Session” is generally terminatedon a user device, such as an HGW, that is, the “IP Session” is a sessionconnection established between the user device and the IP edge node, andis a single hop session. The “IP session” is used for a network tomanage the access of users to the network, such as charging and status.The “IP Session” uses an IP address or an IP address prefix as anidentifier of the “IP Session.”

In the implementation of the present invention, the inventors find thatat least the following problems exist in the prior art: In the priorart, an HGW under the IPv4 supports Network Address Translation (NAT),and an “IPv4 Session” is a “Single IPv4 hop;” while an HGW under theIPv6 is a router, and generally does not support the NAT, and in thiscase, a user device on which the “IP Session” is terminated is notnecessarily an HGW, and may be a User Equipment (UE) following the HGW,and at this time, the “IPv6 Session” needs to be extended to a “MultipleIPv6 hop,” but no solution in the prior art solves how the UE followingthe HGW traverses the HGW to realize keepalive monitoring (Keepalive) ofa “Multiple hop IPv6 Session.”

SUMMARY OF THE INVENTION

Embodiments of the present invention provide a method and a system forIP session keepalive monitoring, an HGW and a network device, whichrealize keepalive monitoring of a “Multiple hop IPv6 Session.”

In an embodiment, the present invention provides an IP session keepalivemonitoring method, which includes:

receiving, by a UE or an IP edge node, a BFD message sent by an HGW, inwhich a first discriminator field value included in the BFD message is adifference between an IP address prefix of the UE and an IP addressprefix of the HGW; and

monitoring, by the UE or the IP edge node, whether an IP session betweenthe IP edge node and the UE is keepalive according to the firstdiscriminator field value in the BFD message.

In an embodiment, the present invention provides an HGW, which includes:

a receiving module, configured to receive a BFD message sent by a UE oran IP edge node; and

a forwarding module, configured to send the BFD message including afirst discriminator field value to the IP edge node or the UE accordingto the BFD message received by the receiving module, in which the firstdiscriminator field value is a difference between an IP address prefixof the UE and an IP address prefix of the HGW.

In an embodiment, the present invention provides a network device, whichincludes:

a second receiving module, configured to receive a BFD message sent byan HGW, in which a first discriminator field value included in the BFDmessage is a difference between an IP address prefix of a UE and an IPaddress prefix of the HGW; and

a processing module, configured to monitor whether an IP session betweenan IP edge node and the UE is keepalive according to the firstdiscriminator field value in the BFD message.

In the method and the system for IP session keepalive monitoring, theHGW and the network device according to the embodiments of the presentinvention, “Multihop BFD” is used as a keepalive monitoring mechanism ofa “Multihop IPv6 Session,” so that an “IPv6 Session” can be establishedbetween the UE following the HGW and the IP edge node, and a “Single hopIP Session” can be extended to a “Multihop IP Session,” therebyrealizing keepalive monitoring of the “Multiple hop IPv6 Session.”

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic structural diagram of an “IPv6 Session” systemaccording to the present invention;

FIG. 2 is a schematic diagram of a “Multihop IPv6 Session” data planeaccording to the present invention;

FIG. 3 is a schematic principle diagram of an “IPv6 Session” keepalivemonitoring proxy according to the present invention;

FIG. 4 is a schematic diagram of an IP session keepalive monitoringmethod according to a first embodiment of the present invention;

FIG. 5 is a schematic diagram of an IP session keepalive monitoringmethod according to a second embodiment of the present invention;

FIG. 6 is a schematic diagram of an IP session keepalive monitoringmethod according to a third embodiment of the present invention;

FIG. 7 is a schematic structural diagram of an HGW according to anembodiment of the present invention;

FIG. 8 is a schematic structural diagram of a network device accordingto an embodiment of the present invention; and

FIG. 9 is a schematic structural diagram of an IP session keepalivemonitoring system according to an embodiment of the present invention.

DETAILED DESCRIPTION OF THE EMBODIMENTS

The technical solutions according to the embodiments of the presentinvention are further illustrated in the following with reference to theaccompanying drawings and specific embodiments.

FIG. 1 is a schematic structural diagram of an “IPv6 Session” systemaccording to the present invention. As shown in FIG. 1, an HGW is athree-layer router, and realizes an “IPv6 Session Keepalive” (keepalivemonitoring) “proxy” function. A plurality of UEs or a plurality of “IPv6Sessions” may be bundled to form a UE group or an “IPv6 Session” groupaccording to classification of management domains, geographic regions orservices. An “IP Session 0” is a single hop “IPv6 Session” establishedbetween the HGW and a BNG with the HGW as a subscriber; an “IP Sessionn” is an “IPv6 Session” established between a UE (particularly a nomadicuser) and a BNG with the UE as a Subscriber, the “IP Session n” is amultihop “Session,” a hop from the UE to the HGW is a first hop, and ahop from the HGW to an “IP edge node” is a second hop; and the HGWapplies for an address prefix through Dynamic Host ConfigurationProtocol (DHCP) Prefix Delegation (PD), for example, an address prefix“Prefix Z” of 56 bits. The HGW extends different sub-prefixes for thefollowing UE through the “Prefix Z,” for example, different users havedifferent sub-prefixes of 64 bits, or a fixed user and a nomadic userhave different sub-prefixes of 64 bits. The “IP Session” uses an IPaddress/prefix as an “IP Session” identifier, for example, the “IPSession 0” uses the “Prefix Z” of 56 bits as an identifier, and the “IPSession n” uses a “Prefix Yn” of 64 bits as an identifier, where n=1, 2,3 . . . .

FIG. 2 is a schematic diagram of a “Multihop IPv6 Session” data planeaccording to the present invention. As shown in FIG. 2, on the dataplane, a “Multihop IP Session” between a BNG and a UE is borne on asingle hop “IP Session” between the BNG and an HGW. FIG. 3 is aschematic principle diagram of an “IPv6 Session” keepalive monitoringproxy according to the present invention. As shown in FIG. 4, FIG. 5 andFIG. 6, a block “P” represents a session peer, and the present inventionmainly provides two solutions.

In Solution 1, “Multihop BFD” is used as a keepalive monitoringmechanism of a “Multihop IPv6 Session,” a keepalive monitoring proxy (anIPv6 Session Keepalive Proxy) is disposed on the HGW, and a “MultihopBFD” protocol message is transparently transmitted or a discriminatorfield of the BFD protocol message is modified.

In Solution 2, an “IPv6 Session Keepalive Proxy” is disposed on the HGW,a “Legacy UE” performs “Session keepalive” of a first hop by adopting“Single hop Neighbor Unreachable Detection (NUD)”/“BFD”, the BNGperforms “Session keepalive” of a second hop by adopting “Single hopBFD,” and the “IPv6 Session Keepalive Proxy” realizes keepalive relayfrom the NUD/BFD of the first hop to the BFD of the second hop. Aplurality of UEs or a plurality of “IPv6 Sessions” may be bundled toform a UE group or an IPv6 Session group according to classification ofmanagement domains, geographic regions or services, a proxy may usedifferent Wide Area Network (WAN) ports to correspond to different UEgroups or “IPv6 Session” groups. Specially, when a UE group or an “IPv6Session” group only contains one UE or “IPv6 Session,” the proxy may usedifferent WAN ports to correspond to different UEs or “IPv6 Sessions.”

FIG. 4 is a schematic diagram of an IP session keepalive monitoringmethod according to a first embodiment of the present invention. In thisembodiment, an “IPv6 Session Keepalive Proxy” disposed on an HGWrealizes keepalive monitoring of a “Multiple hop IPv6 Session” in atransparent transmission manner. An IP edge node may include a BNG or aBRAS, and in each embodiment of the present invention, the IP edge nodeis illustrated by taking the BNG as an example. As shown in FIG. 4, “IPSession” keepalive monitoring between a UE and a BNG includes: The HGWforwards a BFD message sent between the UE and the BNG, in which a firstdiscriminator field value in the BFD message is a difference between anIP address prefix of the UE and an IP address prefix of the HGW; the UEreceives the BFD message, and monitors whether an IP session between theUE and the BNG is keepalive according to the first discriminator fieldvalue. For a downlink direction, the BNG sends the BFD message to theUE, and after receiving the message, the UE may determine that acorresponding “BFD Session” is keepalive according to a value of a“Discriminator” field in the message in combination with a predefined“BFD Session” identifier, and since the “BFD Session” is associated withthe “IP Session,” the UE may determine whether the “IP Session” iskeepalive. The BNG receives a BFD message, and monitors whether the IPsession between the BNG and the UE is keepalive according to the firstdiscriminator field value in the BFD message. For an uplink direction,the UE sends the BFD message to the BNG, and after receiving themessage, the BNG may determine whether a corresponding “IPv6 Session” iskeepalive according to a value of a “Discriminator” field in the messagein combination with a predefined “BFD Session” identifier.

The “IPv6 Session” keepalive monitoring between the HGW and the BNGincludes: The HGW receives the BFD message sent by the BNG, and monitorswhether an IP session between the HGW and the BNG is keepalive accordingto a second discriminator field value in the BFD message, in which thesecond discriminator field value is set to a special value, for example,“0” or “0xFFFF.” In the downlink direction, the BNG sends the BFDmessage to the HGW, and the HGW may determine the corresponding “BFDSession” according to the value of the “Discriminator” field in the BFDmessage, and accordingly monitor a keepalive status of the associated“IP Session”. The BNG receives a BFD message sent by the HGW, andmonitors whether the IP session between the BNG and the HGW is keepaliveaccording to source IP address related information and/or the seconddiscriminator field value in the BFD message, in which the source IPaddress related information includes a source IP address or a source IPaddress prefix. In the uplink direction, after receiving the BFD messagesent by the BNG, the HGW may determine the corresponding “BFD Session”according to a source IP address of the message, that is, a source IPaddress/prefix of the BNG, and/or the value of the “Discriminator” fieldin the BFD message, and accordingly monitor a keepalive status of theassociated “IP Session.”

Specifically, in the transparent transmission mode of the HGW:

The “BFD Session” adopted by “Keepalive” of the single hop “IPv6Session” performs “Keepalive” interaction with an address of the HGW oran address of the BNG, and the “Discriminator” field of the BFD messageis set to “0” or “0xFFFF.”

The “BFD Session” adopted for “IPv6 Session Keepalive” of the multihop“IPv6 Session” performs “Keepalive” interaction with an address of theUE or an address of the BNG, and the “Discriminator” field value in theBFD message is set to (Yn-Z), where n=1, 2, 3 . . . , that is, adifference between a “Prefix Yn” and a “Prefix Z”. For example, if the“Prefix Yn=2002:db8:200:122::/64,” and the “PrefixZ=2002:db8:200:100::/56,” Yn-Z=0×22, as shown in Table 1.

TABLE 1 0 to 15 15 to 31 32 to 47 48 to 55 56 to 63 bits bits bits bitsbits Prefix Yn 0x2002 0x0db8 0x0200 0x01 0x22 Prefix Z 0x2002 0x0db80x0200 0x01 0x00 Yn-Z 0 0 0 0 0x22

The BNG/UE associates the “BFD Session” with a corresponding “IPv6Session”/“IPv6 Session” group according to the “Discriminator” fieldvalue in the BFD message. The “Discriminator” field may include a “MyDiscriminator” or a “Your Discriminator” field. Additionally, under thesame “Prefix Yn,” a user may have a plurality of IP addresses, and aplurality of “IP Sessions,” the plurality of “IP Sessions” may be usedas an “IP Session” group to be associated with the “Discriminator” fieldvalue in the BFD message, that is, the “Discriminator” field of the BFDmessage may represent an “IP Session” group under the same “Prefix Yn,”so the first discriminator field value is configured to identify one IPsession or multiple IP sessions under the same IP address prefix of theUE.

Optionally, a source IP address prefix is configured to identify one IPsession, and the single hop “BFD Session” uses the “Prefix Z” as anidentifier of the “Session;” and the multihop “BFD Session” uses the“Prefix Z” or the “Prefix Yn” as an identifier of the “Session.”

Taking FIG. 4 as an example, an “IP Session 0” may be identified with a“Prefix Z,” and adopt a “BFD Session 0” to support “Keepalive,” and the“Discriminator” field of the BFD message is set to “0” or “0xFFFF;” andthe BNG/UE associates the “BFD Session 0” with a corresponding “IPv6Session 0” according to the source IP address prefix “Prefix Z” and the“Discriminator” field value (0 or 0xFFFF) of the BFD message.

An “IP Session 1” may be identified with a “Prefix Y1,” and adopt a “BFDSession 1” to support “Keepalive,” and the “Discriminator” field of theBFD message is set to (Y1-Z); and the BNG/UE associates the “BFD Session1” with a corresponding “IPv6 Session 1” according to the“Discriminator” field value (Y1-Z) of the BFD message.

An “IP Session n” may be identified with a “Prefix Yn,” and adopt a “BFDSession n” to support “Keepalive,” and the “Discriminator” field of theBFD message is set to (Yn-Z); and the BNG/UE associates the “BFD Sessionn” with a corresponding “IPv6 Session n” according to the“Discriminator” field value (Yn-Z) of the BFD message.

In still another embodiment of the present invention, an “IPv6 SessionKeepalive Proxy” disposed on an HGW realizes keepalive monitoring of a“Multiple hop IPv6 Session” in a proxy mode. The proxy mode is: The HGWreceives a detection message sent between a UE or a BNG, modifies afirst discriminator field value in the detection message, and thenforwarding the modified detection message to the BNG or the UE; andmonitoring, by the UE or the BNG, whether an IP session between the BNGand the UE is keepalive according to the first discriminator field valuein the detection message. For the proxy mode, different port settings ofthe HGW are introduced respectively.

A case of the proxy mode is as shown in FIG. 4. For the keepalivemonitoring of the “IP Session” between the UE and the BNG, the modifyingthe first discriminator field value in the detection message, and thenforwarding the modified detection message to the BNG or the UEspecifically includes: receiving, by the HGW, the BFD message sent bythe UE, modifying the first discriminator field value in the BFD messageinto the difference between the IP address prefix of the UE and the IPaddress prefix of the HGW, and then sending the modified BFD message tothe BNG; The HGW receives the BFD message sent by the BNG, in which thefirst discriminator field value in the BFD message is the differencebetween the IP address prefix of the UE and the IP address prefix of theHGW, modifies the first discriminator field value into a valuerecognizable to the UE, and sends the modified BFD message to the UE.The “BFD Session” adopted for “IPv6 Session Keepalive” of the multihop“IPv6 Session” performs “Keepalive” interaction with an address of theuser or an address of the BNG, and the “IPv6 Session Keepalive Proxy”modifies a value of a “Discriminator” field of a first hop BFD messageinto (Yn-Z), that is, a difference between the “Prefix Yn” and the“Prefix Z,” and then forwards the message on a second hop; or the “IPv6Session Keepalive Proxy” modifies the “Discriminator” field value (Yn-Z)of a second hop BFD message into a value recognizable to the UE/BNG, andthen forwards the message on the first hop. Likewise, the BNG/UEassociates the “BFD Session” with a corresponding “IPv6 Session”according to the “Discriminator” field value in the BFD message. The“Discriminator” field may include a “My Discriminator” or a “YourDiscriminator” field. Additionally, under the same “Prefix Yn,” a usermay have a plurality of IP addresses, and a plurality of “IP Sessions,”the plurality of “IP Sessions” may be used as an “IP Session” group tobe associated with the “Discriminator” field value in the BFD message,that is, the “Discriminator” field of the BFD message may represent an“IP Session” group under the same “Prefix Yn.” Optionally, the singlehop “BFD Session” uses the “Prefix Z” as an identifier of the “Session;”and the multihop “BFD Session” uses the “Prefix Z” or the “Prefix Yn” asan identifier of the “Session.”

The keepalive monitoring of the “IPv6 Session” between the HGW and theBNG is realized by the same method as the method in which the “IPv6Session Keepalive Proxy” disposed on the HGW realizes the “Multiple hopIPv6 Session” in the transparent transmission manner, and the detailsare not described herein again.

Another case of the proxy mode is as shown in FIG. 5. FIG. 5 is aschematic diagram of an IP session keepalive monitoring method accordingto a second embodiment of the present invention. In this embodiment, an“IPv6 Session Keepalive Proxy” disposed on an HGW realizes keepalivemonitoring of a “Multiple hop IPv6 Session” in a proxy manner, and a“Proxy” uses different WAN ports to correspond to different UE groups orIPv6 Session groups. For example, in FIG. 5, a WAN port 0 corresponds toUser 1 to User n.

For the keepalive monitoring of the “IPv6 Session” between the UE andthe BNG, the HGW receives a BFD or NUD message sent by the UE through acorresponding Local Area Network (LAN) port. For the BFD message, akeepalive monitoring message of a next hop is reconstructed, that is,both a source address and a destination address of the next hopmonitoring message are changed; for example, in the uplink direction,the destination address is modified to the address of the BNG, and thesource address is modified to the address of the HGW. The processingspecifically includes: the first discriminator field value in the BFDmessage is modified to the difference between the IP address prefix ofthe UE and the IP address prefix of the HGW, and then the reconstructedBFD message including the modified first discriminator field value issent to the BNG through a WAN port corresponding to the different LANports. For the NUD message, the HGW receives the NUD message sent by theUE, reconstructs a BFD message of a next hop, and sends thereconstructed BFD message to the BNG. In the downlink direction, the HGWreceives the BFD message sent by the BNG through a WAN port, in whichthe first discriminator field value in the BFD message is the differencebetween the IP address prefix of the UE and the IP address prefix of theHGW, modifies the first discriminator field value to a valuecorresponding to the IP address prefix of the UE, reconstructs the BFDmessage, and sends the BFD message including the modified firstdiscriminator field value to the UE through the corresponding LAN ports.

The “IPv6 Session” keepalive monitoring between the HGW and the BNGincludes: The HGW receives the BFD message sent by the BNG, and monitorswhether an IP session between the HGW and the BNG is keepalive accordingto a second discriminator field value in the BFD message, in which thesecond discriminator field value is set to a special value, for example,“0” or “0xFFFF.” In the downlink direction, the BNG sends the BFDmessage to the HGW, and the HGW may determine the corresponding “BFDSession” according to the “Discriminator” field value in the BFDmessage, and accordingly monitor a keepalive status of the associated“IP Session.” The BNG receives the BFD message sent by the HGW, andmonitors whether the IP session between the BNG and the HGW is keepaliveaccording to the second discriminator field value in the BFD message. Inthe uplink direction, after receiving the BFD message sent by the BNG,the HGW may determine the corresponding “BFD Session” according to the“Discriminator” field value in the BFD message, and accordingly monitora keepalive status of the associated “IP Session.”

Specifically, the “BFD Session” adopted for “Keepalive” of the singlehop “IPv6 Session” performs “Keepalive” interaction with an address ofthe HGW or an address of the BNG, and the “Discriminator” field of theBFD message is set to a special value, for example, “0” or “0xFFFF.”

The “IPv6 Session Keepalive” of the multihop “IPv6 Session” is completedby adopting two single hops. Through a “Keepalive” procedure in whichthe “Proxy” relays the first hop and the second hop, the “Keepalive”status synchronization between the first hop and the second hop ismaintained, and the “Discriminator” field of the “BDF Session” may beset or modified through the “Proxy.”

The first hop performs the “keepalive” by adopting the single hop“NUD/BFD Session”, and the second hop performs the “keepalive” byadopting the single hop “BFD Session.”

The single hop “NUD/BFD Session” adopted by the first hop performs the“Keepalive” interaction with the address of the user or the “Proxy”address, in which, the “Proxy” address may be an LAN port address of theHGW, and the “Discriminator” field of the BFD message is set to a valuecorresponding to the “Prefix Yn” (n=1, 2, 3, . . . ). For example, it isrecommended to use the last 32 bits of the “Prefix Yn” as the“Discriminator” field value, or the value is (Yn-Z), where n=1, 2, 3 . .. .

In the first hop, the UE/HGW associates the “BFD Session” with acorresponding “IPv6 Session” according to the “Discriminator” fieldvalue in the BFD message.

The single hop “BFD Session” adopted by the second hop performs the“Keepalive” interaction with the address of the BNG or the Proxyaddress, in which the Proxy address may be a WAN port address of theHGW, and the “Discriminator” field of the BFD message is set to (Yn-Z),where n=1, 2, 3 . . . that is, the difference between the “Prefix Yn”and the “Prefix Z.”

The “IPv6 Session Keepalive Proxy” modifies a value of a “Discriminator”field of a first hop BFD message to (Yn-Z), and then forwards themessage on the second hop; or the “IPv6 Session Keepalive Proxy”modifies the “Discriminator” field value (Yn-Z) of a second-hop BFDmessage to a value corresponding to the “Prefix Yn”, and then forwardsthe message on the first hop.

In the second hop, the BNG/HGW associates the “BFD Session” with acorresponding “IPv6 Session” according to the source IP address/prefixand/or the “Discriminator” field value in the BFD message. The “Proxy”uses different WAN ports to correspond to different UE groups or IPv6Session groups, and under the same WAN port, the BNG/HGW distinguishes“IPv6 Sessions” or “IPv6 Session” groups of different users according tothe “Discriminator” field value in the BFD message.

Optionally, the single hop “BFD Session” uses the “Prefix Z” as anidentifier of the “Session”; and the multihop “BFD Session” uses the“Prefix Z” or the “Prefix Yn” as an identifier of the “Session.”

Taking FIG. 5 as an example, an “IP Session 0” may be identified with a“Prefix Z”, and adopt a “BFD Session 0” to support “Keepalive,” and the“Discriminator” field of the BFD message is set to “0” or “0xFFFF;” andthe BNG/UE associates the “BFD Session 0” with a corresponding “IPv6Session 0” according to the source IP address prefix “Prefix Z” and the“Discriminator” field value (0 or 0xFFFF) of the BFD message.

An “IP Session 1” may be identified with a “Prefix Y1,” and adopt a “BFDSession 11” and the “BFD Session 0” to support “Keepalive,” and the“Discriminator” field of the “BFD Session 0” message is set to (Y1-Z);the BNG/HGW associates the “BFD Session 0” with a corresponding “IPv6Session 1” according to the source IP address prefix “Prefix Z” and the“Discriminator” field value (Y1-Z) of the BFD message; and the HGW/UEassociates the “BFD Session 11” with a corresponding “IPv6 Session 1”according to the source IP address prefix “Prefix Y1” of the BFDmessage.

An IP Session n may be identified with a “Prefix Yn,” and adopt a “BFDSession 1n” and the “BFD Session 0” to support “Keepalive,” and the“Discriminator” field of the “BFD Session 0” message is set to (Yn-Z);and the “Discriminator” field of the “BFD Session 1n” message is set tothe last 32 bits of the “Prefix Yn.” The BNG/HGW associates the “BFDSession 0” with a corresponding “IPv6 Session n” according to the sourceIP address prefix “Prefix Z” and the “Discriminator” field value (Yn-Z)of the BFD message; and the HGW/UE associates the “BFD Session 1n” witha corresponding “IPv6 Session n” according to the source IP addressprefix “Prefix Yn” of the BFD message.

In the procedure of forwarding the detection message and monitoring thekeepalive of the “IPv6 Session,” the HGW further performs an operationof status synchronization of session peers. The operation includes: yhe“Proxy” collects a diagnostic code (BFD diagnostic code) or an NUDstatus of one hop in the “IP Session”, and performs expression on theother hop through the diagnostic code (BFD diagnostic code) or the NUDstatus.

Taking FIG. 5 as an example, when both the first hop and the second hopare the “BFD Session,” in the uplink direction, the “Proxy” is in chargeof replicating a “diagnostic code” value of the BFD message of the firsthop to a “diagnostic code” field of the BFD message of the second hop,or the “Proxy” is in charge of diagnosing a keepalive status of asession peer 1 (Peer1) of the first hop, then generating a correspondingdiagnostic code (BFD diagnostic code) for the keepalive status of thesession peer 1 (Peer1), and notifying a session peer 2 (Peer2) through aBFD message. The BNG distinguishes keepalive status of “IPv6 Sessions”of different users according to the “Discriminator” field value in theBFD message; and in the downlink direction, the “Proxy” is in charge ofreplicating a “diagnostic code” value of the BFD message of the secondhop to a “diagnostic code” fields of the first-hop BFD messages of all“IP Sessions,” or the “Proxy” is in charge of diagnosing the keepalivestatus of the session peer 2 (Peer2) of the second hop, then generatinga corresponding diagnostic code (BFD diagnostic code) for the keepalivestatus of the session peer 2 (Peer2), and notifying the session peer 1(Peer1) of all “IP Sessions” of the diagnostic code through a BFDmessage of the first hop.

When one hop is the NUD while the other hop is the “BFD Session”, in theuplink direction, the “Proxy” is in charge of diagnosing the keepalivestatus of the session peer 1 (Peer1) of the first hop through an NUDmechanism, then generating a corresponding diagnostic code (BFDdiagnostic code) for the keepalive status of the first hop, andnotifying the session peer 2 (Peer2) through a BFD message. The BNGdistinguishes keepalive status of “IPv6 Sessions” of different usersaccording to the “Discriminator” field value in the BFD message; forexample, after sending a Neighbor Solicitation (NS) message to the Peer1, if the “Proxy” does not receive a Neighbor Advertisement (NA) messageanswered by the Peer 1 in a given time, the “Proxy” generates acorresponding diagnostic code (BFD diagnostic code), such as “diagnosticcode=1” indicating Control Detection Time Expired, “diagnostic code=2”indicating Echo Function Failed or “diagnostic code=3” indicatingNeighbor Signaled Session Down of the Peer 1, and then notifies thePeer2 through a BFD message.

Alternatively, when one hop is the NUD while the other hop is the “BFDSession,” in the downlink direction, the “Proxy” is in charge ofgenerating a corresponding NUD action on the first hops of all “IPSessions” according to the “diagnostic code” value of the BFD message ofthe second hop. For example, when the “diagnostic code” of the BFDmessage of the second hop indicates Neighbor Signaled Session Down, PathDown, Control Detection Time Expired, Echo Function Failed, ForwardingPlane Reset or Administratively Down of the Peer 2, the “Proxy”indicates neighbor unreachable to Peers of all “IP Sessions” through theNUD, for example, after receiving the NS message of the Peer 1, the“Proxy” may not return the NA message to the Peer 1, or the “Proxy”stops actively initiating the NS message to the Peer 1.

Still another case of the proxy mode is as shown in FIG. 6. FIG. 6 is aschematic diagram of an IP session keepalive monitoring method accordingto a third embodiment of the present invention. In this embodiment, an“IPv6 Session Keepalive Proxy” disposed on an HGW realizes keepalivemonitoring of a “Multiple hop IPv6 Session” in a proxy manner, and aProxy uses different WAN ports to correspond to different UEs or IPv6Sessions. For example, in FIG. 6, a WAN port 1 corresponds to a user 1,and a WAN port n corresponds to a user n.

For the keepalive monitoring of the “IPv6 Session” between the UE andthe BNG, the HGW receives a BFD or NUD message sent by the UE through anLAN port. For the BFD message, a keepalive monitoring message of a nexthop is reconstructed, that is, both a source address and a destinationaddress of the next hop monitoring message are changed. For example, inthe uplink direction, the destination address is modified to the addressof the BNG, and the source address is modified to the address of theHGW, which specifically includes: The first discriminator field value inthe BFD message is modified into a value corresponding to the IP addressprefix of the UE, and then the reconstructed BFD message including themodified first discriminator field value is sent to the BNG through aWAN port corresponding to the LAN port. For the NUD message, the HGWreceives the NUD message sent by the UE, reconstructs a BFD message of anext hop, and sends the reconstructed BFD message to the BNG. In thedownlink direction, the HGW receives the BFD message sent by the BNGthrough a WAN port, in which the first discriminator field value in theBFD message is a value corresponding to the IP address prefix of the UE,reconstructs a BFD or NUD message, and sends the NUD message or the BFDmessage including the first discriminator field value to the UE throughan LAN port corresponding to the WAN port.

The “IPv6 Session” keepalive monitoring between the HGW and the BNGincludes: The HGW receives the BFD message sent by the BNG, and monitorswhether an IP session between the HGW and the BNG is keepalive accordingto a second discriminator field value in the BFD message, in which thesecond discriminator field value is set to a special value, for example,“0” or “0xFFFF”. In the downlink direction, the BNG sends the BFDmessage to the HGW, and the HGW may determine the corresponding “BFDSession” according to the “Discriminator” field value in the BFDmessage, and accordingly monitor a keepalive status of the associated“IP Session.” The BNG receives the BFD message sent by the HGW, andmonitors whether the IP session between the BNG and the HGW is keepaliveaccording to the second discriminator field value in the BFD message. Inthe uplink direction, after receiving the BFD message sent by the BNG,the HGW may determine the corresponding “BFD Session” according to the“Discriminator” field value in the BFD message, and accordingly monitora keepalive status of the associated “IP Session.”

Specifically, the “BFD Session” adopted by “Keepalive” of the single hop“IPv6 Session” performs “Keepalive” interaction with an address of theHGW or an address of the BNG, and the “Discriminator” field of the BFDmessage is set to “0” or “0xFFFF.”

The “IPv6 Session Keepalive” of the multihop “IPv6 Session” is completedby adopting two single hops. Through a “Keepalive” procedure in whichthe “Proxy” relays the first hop and the second hop, the “Keepalive”status synchronization between the first hop and the second hop ismaintained.

The first hop performs the “keepalive” by adopting the single hop“NUD/BFD Session”, and the second hop performs the “keepalive” byadopting the single hop “BFD Session.”

The single hop “NUD/BFD Session” adopted by the first hop performs the“Keepalive” interaction with the address of the user or the “Proxy”address, in which the “Proxy” address may be an LAN port address of theHGW, and the “Discriminator” field of the BFD message is set to a valuecorresponding to the “Prefix Yn” (n=1, 2, 3, . . . ). For example, thelast 32 bits of the “Prefix Yn” are used as the “Discriminator” fieldvalue, or the value is (Yn-Z), where n=1, 2, 3, . . . .

In the first hop, the UE/HGW associates the “BFD Session” with acorresponding “IPv6 Session” according to the “Discriminator” fieldvalue in the BFD message.

The single hop “BFD Session” adopted by the second hop performs the“Keepalive” interaction with the address of the BNG or the “Proxy”address, in which the “Proxy” address may be a WAN port address of theHGW, and the “Discriminator” field of the BFD message is set to a valuecorresponding to the “Prefix Yn” (n=1, 2, 3, . . . ). For example, thelast 32 bits of the “Prefix Yn” are used as the “Discriminator” fieldvalue, or the value is (Yn-Z), where n=1, 2, 3, . . . .

In the second hop, the BNG/HGW associates the “BFD Session” with acorresponding “IPv6 Session” according to the source IP address/prefixand/or the “Discriminator” field value in the BFD message. The “Proxy”corresponds to different UEs or IPv6 Sessions by adopting different WANports, and the BNG/HGW distinguishes “IPv6 Sessions” of different usersaccording to the “Discriminator” field value in the BFD message.

Optionally, the single hop “BFD Session” uses the “Prefix Z” as anidentifier of the “Session”; and the multihop “BFD Session” uses the“Prefix Z” or the “Prefix Yn” as an identifier of the “Session.”

Taking FIG. 6 as an example, an “IP Session 0” may be identified with a“Prefix Z”, and adopt a “BFD Session 0” to support “Keepalive,” and the“Discriminator” field of the BFD message is set to “0” or “0xFFFF;” andthe BNG/UE associates the “BFD Session 0” with a corresponding “IPv6Session 0” according to the source IP address prefix “Prefix Z” of theBFD message.

An “IP Session 1” may be identified with a “Prefix Y1”, and adopt a “BFDSession 11” and a “BFD Session 21” to support “Keepalive”, and the“Discriminator” field of the “BFD Session 21” message is set to (Y1-Z);the BNG/HGW associates the “BFD Session 21” with a corresponding “IPv6Session 1” according to the source IP address prefix “Prefix Y1” of theBFD message; and the HGW/UE associates the “BFD Session 11” with acorresponding “IPv6 Session 1” according to the source IP address prefix“Prefix Y1” of the BFD message.

An “IP Session n” may be identified with a Prefix Yn, and adopt a “BFDSession 1n” and a “BFD Session 2n” to support “Keepalive”, and the“Discriminator” field of the “BFD Session 2n” BFD message is set to(Yn-Z); and the “Discriminator” field of the “BFD Session 1n” BFDmessage is set to the last 32 bits of the “Prefix Yn”. The BNG/HGWassociates the “BFD Session 2n” with a corresponding “IPv6 Session n”according to the source IP address prefix “Prefix Yn” of the BFDmessage; and the HGW/UE associates the “BFD Session 1n” with acorresponding “IPv6 Session n” according to the source IP address prefix“Prefix Yn” of the BFD message.

In the procedure of forwarding the detection message and monitoring thekeepalive of the “IPv6 Session”, the HGW further performs an operationof status synchronization of session peers. The operation may include:The “Proxy” collects a diagnostic code (BFD diagnostic code) or an NUDstatus such as neighbor unreachable of one hop in the “IP Session”, andperforms expression on the other hop through the diagnostic code (BFDdiagnostic code) or the NUD.

For example, when both the first hop and the second hop are the “BFDSession”, the “Proxy” is in charge of replicating a “diagnostic code”value of the BFD message of one hop to a “diagnostic code” field of theBFD message of the other hop, or the “Proxy” is in charge of diagnosinga keepalive status of a session peer 1 (Peer1) of one hop, thengenerating a corresponding diagnostic code (BFD diagnostic code) for thekeepalive status of the session peer 1 (Peer1), and notifying a sessionpeer 2 (Peer2) through a BFD message.

When one hop is the NUD while the other hop is the “BFD Session”, in theuplink direction, the “Proxy” is in charge of diagnosing the keepalivestatus of the session peer 1 (Peer1) of the first hop through an NUDmechanism, then generating a corresponding diagnostic code (BFDdiagnostic code) for the keepalive status of the first hop, andnotifying the session peer 2 (Peer2) through a BFD message; and forexample, after sending an NS message to the Peer 1, if the “Proxy” doesnot receive an NA message answered by the Peer 1 in a given time, the“Proxy” generates a corresponding diagnostic code (BFD diagnostic code),such as “diagnostic code=1” indicating Control Detection Time Expired,“diagnostic code=2” indicating Echo Function Failed) or “diagnosticcode=3” indicating Neighbor Signaled Session Down of the Peer 1, andthen notifies the Peer2 through a BFD message.

Alternatively, when one hop is the NUD while the other hop is the “BFDSession”, in the downlink direction, the “Proxy” is in charge ofgenerating a corresponding NUD action on the first hop according to the“diagnostic code” value of the BFD message of the second hop. Forexample, when the “diagnostic code” of the BFD message of the second hopindicates Neighbor Signaled Session Down of the Peer 2, Path Down,Control Detection Time Expired, Echo Function Failed, Forwarding PlaneReset or Administratively Down, the “Proxy” indicates neighborunreachable to the Peer 1 through the NUD, for example, after receivingthe NS message of the Peer 1, the “Proxy” may not return the NA messageto the Peer 1, or the “Proxy” stops actively initiating the NS messageto the Peer 1.

In the IP session keepalive monitoring method according to theembodiment of the present invention, “Multihop BFD” is used as akeepalive monitoring mechanism of a “Multihop IPv6 Session”, or an “IPv6Session Keepalive Proxy” is disposed on the HGW, so that an “IPv6Session” can be established between the UE following the HGW and the IPedge node, and a “Single hop IP Session” can be extended to a “MultihopIP Session”, thereby realizing keepalive monitoring of the “Multiple hopIPv6 Session”.

Persons of ordinary skill in the art may understand that all or part ofthe steps of the method according to the embodiments may be implementedby a program instructing relevant hardware. The program may be stored ina computer readable storage medium. When the program is executed, thesteps of the method according to the embodiments are performed. Thestorage medium may be any medium that is capable of storing programcodes, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), amagnetic disk, or an optical disk.

FIG. 7 is a schematic structural diagram of an HGW according to anembodiment of the present invention. As shown in FIG. 7, the HGWincludes a first receiving module 11 and a first forwarding module 12,in which the first receiving module 11 is configured to receive a BFDmessage sent by a UE or an IP edge node; and the first forwarding module12 is configured to send the BFD message including a first discriminatorfield value to the IP edge node or the UE according to the BFD messagereceived by the first receiving module, in which the first discriminatorfield value is a difference between an IP address prefix of the UE andan IP address prefix of the HGW. Specifically, the first receivingmodule 11 receives the BFD message sent by the UE or a BNG, and if thefirst discriminator field value in the BFD message is the differencebetween the IP address prefix of the UE and the IP address prefix of theHGW, the BFD message is directly forwarded to the UE or the BNG; and ifthe first discriminator field value in the BFD message is not thedifference between the IP address prefix of the UE and the IP addressprefix of the HGW, the first discriminator field value is modified tothe difference between the IP address prefix of the UE and the IPaddress prefix of the HGW, the modified BFD message is forwarded to theUE or the BNG.

The HGW according to this embodiment further includes a proxy module 13,configured to modify the first discriminator field value in the BFDmessage received by the first receiving module 11. Specifically, toenable the HGW, as a “Router,” to realize the keepalive monitoring ofthe “IP Session” between the UE connected to the HGW and the IP edgenode such as the BNG, a proxy function is added in the HGW, and therelay from the first hop to the second hop is realized through theproxy. The first receiving module 11 receives a BFD detection messagesent by the UE or the BNG, and the proxy module 13 modifies adiscriminator field value in the detection message according to theactual situation so that the message is suitable of being transported ina next hop, thereby achieving the purpose of keepalive monitoring. Aftermodifying the discriminator field value, the proxy module 13 sends thedetection message including the modified discriminator field value to adestination end, which may be the UE or the BNG, of a next hop throughthe first forwarding module 12.

The HGW according to this embodiment further includes a sending module14, configured to send a detection message including a seconddiscriminator field value to the BNG, in which the second discriminatorfield value is “0” or “0xFFFF.” The HGW realizes the session keepalivemonitoring between the HGW and the BNG through the sending module 14.

In the HGW according to this embodiment, an “IPv6 Session KeepaliveProxy” is disposed on the HGW, so that an “IPv6 Session” can beestablished between the UE following the HGW and the IP edge node, and a“Single hop IP Session” can be extended to a “Multihop IP Session,”thereby realizing keepalive monitoring of the “Multiple hop IPv6Session.”

FIG. 8 is a schematic structural diagram of a network device accordingto an embodiment of the present invention. As shown in FIG. 8, thenetwork device includes a second receiving module 21 and a processingmodule 22. The network device receives, through the second receivingmodule 21, a BFD message sent by an HGW, in which a first discriminatorfield value included in the BFD message is a difference between an IPaddress prefix of a UE and an IP address prefix of the HGW; and thenmonitors, through the processing module 22, whether an IP sessionbetween an IP edge node and the UE is keepalive according to the firstdiscriminator field value in the BFD message. The processing module isfurther configured to determine whether a BFD session corresponding tothe first discriminator field value is keepalive according to the firstdiscriminator field value in the BFD message, and determine whether anIP session associated with the BFD session is keepalive according towhether the BFD session is keepalive.

The network device according to this embodiment may be the UE or a BNG,which performs the keepalive monitoring on an “IPv6 Session” between theUE and the BNG through a BFD message sent by the HGW.

FIG. 9 is a schematic structural diagram of an IP session keepalivemonitoring system according to an embodiment of the present invention.As shown in FIG. 9, the IP session keepalive monitoring system includesan HGW 1 and a network device 2. The HGW 1 is configured to send a BFDmessage to the network device, in which a first discriminator fieldvalue in the BFD message is a difference between an IP address prefix ofa UE and an IP address prefix of the HGW; and the network device 2 isconfigured to receive the BFD message sent by the HGW, and monitorwhether an IP session between an IP edge node and the UE is keepaliveaccording to the first discriminator field value in the BFD message.

The HGW and the network device involved in the IP session keepalivemonitoring system according to this embodiment providing may adopt theHGW and the network device according to the foregoing embodiments, andthe details are not described herein again.

In the IP session keepalive monitoring system according to thisembodiment, an “IPv6 Session Keepalive Proxy” is disposed on the HGW, sothat an “IPv6 Session” can be established between the UE following theHGW and the IP edge node, and a “Single hop IP Session” can be extendedto a “Multihop IP Session,” thereby realizing keepalive monitoring ofthe “Multiple hop IPv6 Session.”

Finally, it should be noted that the foregoing embodiments are merelyprovided for describing the technical solutions of the presentinvention, but not intended to limit the present invention. It should beunderstood by persons of ordinary skill in the art that although thepresent invention has been described in detail with reference to theembodiments, modifications can be made to the technical solutionsdescribed in the embodiments, or equivalent replacements can be made tosome technical features in the technical solutions, and suchmodifications or replacements do not depart from the spirit and scope ofthe technical solutions according to the embodiments of the presentinvention.

1. An Internet Protocol (IP) session keepalive monitoring method,comprising: receiving, by a User Equipment (UE) or an IP edge node, aBidirectional Forwarding Detection (BFD) message sent by a Home Gateway(HGW), wherein a first discriminator field value comprised in the BFDmessage is a difference between an IP address prefix of the UE and an IPaddress prefix of the HGW; and monitoring, by the UE or the IP edgenode, whether an IP session between the IP edge node and the UE iskeepalive according to the first discriminator field value in the BFDmessage.
 2. The IP session keepalive monitoring method according toclaim 1, wherein the monitoring whether an IP session between the IPedge node and the UE is keepalive comprises: determining whether a BFDsession corresponding to the first discriminator field value iskeepalive according to the first discriminator field value in the BFDmessage, and determining whether the IP session associated with the BFDsession is keepalive according to whether the BFD session is keepalive.3. The IP session keepalive monitoring method according to claim 2,wherein the BFD message further comprises a second discriminator fieldvalue, and the second discriminator field value is “0” or “0xFFFF”. 4.The IP session keepalive monitoring method according to claim 3, furthercomprising: monitoring, by the HGW or the IP edge node, whether an IPsession between the IP edge node and the HGW is keepalive according tothe second discriminator field value in the BFD message.
 5. The IPsession keepalive monitoring method according to claim 2, wherein thereceiving, by the UE or the IP edge node, the BFD message sent by theHGW specifically comprises: receiving, by the UE or the IP edge node,the BFD message sent by the HGW through a corresponding Wide AreaNetwork (WAN) port.
 6. The IP session keepalive monitoring methodaccording to claim 2, wherein before the receiving, by the UE or the IPedge node, the BFD message sent by the HGW, the method furthercomprises: modifying, by the HGW, the first discriminator field valuecomprised in the BFD message to the difference between the IP addressprefix of the UE and the IP address prefix of the HGW, and thenforwarding the modified BFD message to the UE or the IP edge node. 7.The IP session keepalive monitoring method according to claim 2, furthercomprising: receiving, by the IP edge node or the UE, the BFD messagecarrying a diagnostic code sent by the HGW.
 8. The IP session keepalivemonitoring method according to claim 1, further comprising: receiving,by the HGW, a Neighbor Unreachable Detection (NUD) message sent by theUE, and sending a reconstructed BFD message to the IP edge node; andmonitoring, by the IP edge node, whether the IP session between the IPedge node and the UE is keepalive according to source IP address relatedinformation in the BFD message, wherein the source IP address relatedinformation comprises a source IP address or a source IP address prefix;or receiving, by the HGW, the BFD message sent by the IP edge node, andsending a reconstructed NUD message to the UE; and monitoring, by theUE, whether the IP session between the IP edge node and the UE iskeepalive according to source IP address related information of the NUDmessage, wherein the source IP address related information comprises asource IP address or a source IP address prefix.
 9. The IP sessionkeepalive monitoring method according to claim 8, wherein the receiving,by the HGW, the NUD message sent by the UE, and sending thereconstructed BFD message to the IP edge node comprises: receiving, bythe HGW, the NUD message sent by the UE through a corresponding LocalArea Network (LAN) port, and sending the reconstructed BFD message tothe IP edge node through a WAN port corresponding to the different LANports; or receiving, by the HGW, the NUD message sent by the UE throughan LAN port, and sending the reconstructed BFD message to the IP edgenode through a WAN port corresponding to the LAN port.
 10. The IPsession keepalive monitoring method according to claim 8, wherein thereceiving, by the HGW, the BFD message sent by the IP edge node, andsending the reconstructed NUD message to the UE comprises: receiving, bythe HGW, the BFD message sent by the IP edge node through a WAN port,and sending the reconstructed NUD message to the UE through an LAN portcorresponding to the WAN port.
 11. The IP session keepalive monitoringmethod according to claim 10, further comprising: receiving, by the HGW,the BFD message sent by the IP edge node, and monitoring whether an IPsession between the HGW and the IP edge node is keepalive according to asecond discriminator field value in the BFD message, wherein the seconddiscriminator field value is “0” or “0xFFFF”; or receiving, by the IPedge node, the BFD message sent by the HGW, and monitoring whether an IPsession between the IP edge node and the HGW is keepalive according tothe source IP address related information and/or the seconddiscriminator field value in the BFD message, wherein the source IPaddress related information comprises a source IP address or a source IPaddress prefix.
 12. The IP session keepalive monitoring method accordingto claim 10, further comprising: detecting, by the HGW, a keepalivestatus of the UE, generating a diagnostic code, and sending the BFDmessage comprising the diagnostic code to the IP edge node; or if adetection message sent by the UE and received by the HGW is an NUDmessage, executing, by the HGW, a corresponding NUD operation accordingto the diagnostic code in the BFD message sent by the IP edge node. 13.A Home Gateway (HGW), comprising: a receiving module, configured toreceive a Bidirectional Forwarding Detection (BFD) message sent by aUser Equipment (UE) or an Internet Protocol (IP) edge node; and aforwarding module, configured to send a BFD message comprising a firstdiscriminator field value to the IP edge node or the UE according to theBFD message received by the receiving module, wherein the firstdiscriminator field value is a difference between an IP address prefixof the UE and an IP address prefix of the HGW.
 14. The HGW according toclaim 13, further comprising: a proxy module, configured to modify theBFD message received by the receiving module to the BFD messagecomprising the first discriminator field value.
 15. The HGW according toclaim 13, further comprising: a sending module, configured to send a BFDmessage comprising a second discriminator field value to the IP edgenode, wherein the second discriminator field value is “0” or “0xFFFF”.16. The HGW according to claim 14, wherein: the proxy module is furtherconfigured to collect a diagnostic code or a Neighbor UnreachableDetection (NUD) status in one hop of an IP session, and sending thediagnostic code or the NUD status to a session peer in another hop ofthe IP session through the BFD message.
 17. A network device,comprising: a receiving module, configured to receive a BidirectionalForwarding Detection (BFD) message sent by a Home Gateway (HGW), whereina first discriminator field value comprised in the BFD message is adifference between an Internet Protocol (IP) address prefix of a UserEquipment (UE) and an IP address prefix of the HGW; and a processingmodule, configured to monitor whether an IP session between an IP edgenode and the UE is keepalive according to the first discriminator fieldvalue in the BFD message.
 18. The network device according to claim 17,wherein the processing module is further configured to determine whethera BFD session corresponding to the first discriminator field value iskeepalive according to the first discriminator field value in the BFDmessage, and determine whether an IP session associated with the BFDsession is keepalive according to whether the BFD session is keepalive.